package com.csthink.web.interfaces;

import com.csthink.web.application.dto.test.PassportLoginRequest;
import com.csthink.web.application.dto.test.UserLoginResultBO;
import com.csthink.web.application.service.UserService;
import io.swagger.annotations.Api;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author <a href="mailto:security.2009@live.cn">Mars</a>
 * @since 2023-09-12
 */
@Api(tags = "Test 模块")
@RequestMapping("/v1/passport")
@RestController
public class PassportTestController {

    @Resource
    private UserService userService;

    @PostMapping("/login")
    public UserLoginResultBO login(@Validated @RequestBody PassportLoginRequest request) {
        return userService.login(request);
    }
}
